package com.baizhi.springbootday0202.service.impl;

import com.baizhi.springbootday0202.dao.UserDao;
import com.baizhi.springbootday0202.entity.User;
import com.baizhi.springbootday0202.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class UserServiceImpl implements UserService {

	@Autowired(required = false)
	private UserDao userDao;

	@Override
	@Transactional(readOnly = true)
	public User selectUser(String name, String pwd) {
		return userDao.selectUser(name,pwd);
	}

	@Override
	public int insertUser(User user) {
		return userDao.insertUser(user);
	}
}
